1. Field of the Invention
The present invention relates to a method for reproducing compression-encoded video data, and more particularly, to a method for reproducing encoded video data by decoding video data which is compression-encoded according to an MPEG (moving picture experts group) specification.
The present application for a method for reproducing compression-encoded video data is based on Korean Application No. 37067/1995.
2. Description of the Related Art
In general, the MPEG specification is an international specification for image-compression technology, providing a compression algorithm to video data. The specification is widely used in reproducing apparatus using an optical disk, an optomagnetic disk or a DVCR (digital video cassette recorder) tape and a network such as an ATM (asynchronous transfer mode). The MPEG image compression algorithm fundamentally consists of DCT (discrete cosine transform), quantization, variable length coding, and motion compensation. Information is arranged in a bit string to be transmitted while being compressed to a six level hierarchial structure according to certain sequences and rules. A GOP (group of picture) layer, which is a basic unit for random access of an image, is present under a sequence layer which is the uppermost layer. A picture layer is present under the GOP layer. Each picture is composed of slice layers, and each slice is composed of macroblock layers, which is a basic unit for motion compensation. The macroblock is composed of block layers which is a basic unit for DCT processing.
The format of such MPEG video data is illustrated in FIG. 1 which schematically shows the picture layer with respect to one sequence. The largest data unit in the MPEG video data is a sequence. Generally, a single sequence encompasses the entire film. Alternatively, a plurality of sequences, separated based on story content, constitutes one film. As shown in FIG. 1, each sequence consists of a sequence header and at least one GOP, and one GOP is made up of at least one picture. The sequence header includes various kinds of information commonly applied to the entire sequence, i.e., a size in a horizontal direction, a size in a vertical direction, bit rate and picture rate. Also, the sequence header may include user data starting with a user data start code, as shown in FIG. 2. The GOP is a group which is composed of the GOP header and the pictures. As shown in FIG. 2, the user data starting with the user data start code can be additionally included. Also, the sequence header starts with a sequence header code and the GOP header starts with a group start code. The picture header starts with a picture start code and the sequence ends with a sequence end code. Though defined for use in the MPEG specification, the user data is not actually being used since its specific usage and parameters are not defined.
FIG. 3 illustrates a decoder which is commonly employed to reproduce compression-encoded video data according to the MPEG specification. The decoder comprises a data input buffer 300 for buffering input compression-encoded video data to the MPEG, a variable length decoder (VLD) 302 for performing variable length decoding with respect to the bufferred video data, an inverse-quantizing portion 304 for inverse-quantizing the variable-length-decoded data, an inverse DCT (IDCT) 306 for performing inverse-DCT with respect to the inverse-quantized data, a motion compensation portion 308 for providing compensation in accordance with motion compensation information, a frame buffer 310 for storing the decoded data, a switching portion 312 for controlling the motion compensation and a digital video output, and a micro processor unit (MPU) 314 for controlling the entire decoder.
The MPEG video data as shown in FIG. 1 is decoded by a processing sequence as shown in the flow chart of FIG. 4. The MPEG video data to be decoded is input to the data input buffer 300 of FIG. 3 and passes via the VLD 302 while information necessary for decoding is interpreted by the MPU 314. Based upon such information, the MPU 314 controls the decoder for decoding the MPEG video data.
More specifically, the MPU 314 of FIG. 3 starts decoding a GOP unit after obtaining necessary information by interpreting a sequence header, which is the first step 400 of the video processing sequence of FIG. 4. Subsequently, the MPU 314 interprets the GOP header in a step 402 and performs decoding with respect to each picture in steps 404 and 406.
In the decoding of a picture unit, the data input to the data input buffer 300 passes the VLD 302 and the variable-length-coded data is decoded. After the output of the VLD 302 is rearranged by a block unit, inverse-quantization is performed in the inverse-quantizing portion 304, and the inverse-quantized data passes the IDCT portion 306 while the inverse-DCT is performed. After the data passes through these processes, the picture data having moving information proceeds to the motion compensation step in motion compensation portion 308. If the data has no information for the motion compensation, decoding ends and the picture is output without further processing. The motion compensation is achieved while the MPU 314 controls the switching portion 312 according to the determination of whether the output of the frame buffer 310 is transmitted as a digital video output or used in performing motion compensation in the motion compensation portion 308.
After decoding one picture as mentioned above, the MPU 314 determines whether the next data is the picture start code, and if so, continuously repeats decoding on successive picture units. If the next data is not the picture start code, it is determined whether the next data is the group start code in a step 408. If the data is determined to be the group start code, decoding with respect to the GOP in steps 402 through 406 continues. If the next data is not the group start code, this indicates that the sequence header may be present. A check for the sequence header is performed in a step 410. If the sequence header code is detected, the sequence decoding of the steps 400 through 408 repeats as described above, and if not, it is confirmed whether the sequence end code is generated in a step 412 to end the decoding process.
In the above data structure, when video data having various contents for interaction with a user is being multiplexed, the multiplexing is performed on the basis of a sequence unit. In other words, to continuously reproduce the separate fragments of the story of one MPEG video data, which varies according to the user's selection, it should be possible to use video data of various contents for multiplexing. In the conventional technology as described above, the multiplexing is performed based on the sequence unit as the story is divided by this unit. It is generally known that a part of one sequence is used for multiplexing according to the content of the story. The implementation of multiplexing by content in this manner has been difficult because a large amount of data is required, resulting in a considerable waste of a recording or transmitting medium. In addition, it is difficult to skip the reproduction of a particular portion of the video based on the suitability of the contents for a user based on the user's age or other characteristics. It has not yet been suggested to implement such multiplexing and user programming functions without deviating from the MPEG specification.